<template>
    <h3>自定义事件通信</h3>
    <hr />
    <!-- 
      在vue3中,所有绑定的事件都认为值原生DOM事件,所以.native修饰符被删掉了
     -->
    <Child @xxx="test1" @yyy="test2"/>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
    name: "Event",
});
</script>

<script setup lang="ts">
import Child from "./Child.vue"
const test1 = () => {
    console.log("test1");
}
const test2 = (count: number) => {
    console.log("test2" , count);
}
const test3 = () => {
    console.log("Dom事件");
}
</script>